package clueless.client;

import java.awt.Button;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.border.LineBorder;

import clueless.utilities.Character;
import clueless.utilities.Move;
import clueless.utilities.Room;
import clueless.utilities.Weapon;

public class GUI implements Runnable {

	private JFrame frmClueless;
	private JTextField txtColonelMustard;
	private JTextField txtMissScarlet;
	private JTextField txtProfessorPlum;
	private JTextField txtMrGreen;
	private JTextField txtMrsWhite;
	private JTextField txtMrsPeacock;
	private JTextField txtCandlestick;
	private JTextField txtKnife;
	private JTextField txtLeadPipe;
	private JTextField txtRevolver;
	private JTextField txtRope;
	private JTextField txtWrench;
	private JTextField txtBallroom;
	private JTextField txtBilliardRoom;
	private JTextField txtConservatory;
	private JTextField txtDiningRoom;
	private JTextField txtHall;
	private JTextField txtKitchen;
	private JTextField txtLibrary;
	private JTextField txtLounge;
	private JTextField txtStudy;
	private JTextArea txtMessages;
	private Button btnUp;
	private Button btnRight;
	private Button btnLeft;
	private Button btnDown;
	private Button btnUseSecretPassage;
	private Button btnSuggest;
	private Button btnAccuse;
	
	private String response = "nothing";
	
	private Thread threadObject;
	private JLabel lblPlayerMarker;
	
	public void run() {
		try {
			frmClueless.setVisible(true);
			processMessage("GUI starting");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	public void updateGUI() {
	}
	
	/**
	 * print a message in the text area of the game board
	 * @param message
	 */
	public void processMessage(String message) {
		txtMessages.append("> " + message + "\n");
	}
	
	/**
	 * return the player's character choice
	 * @return
	 */
	public String getPreferredCharacter(String message) {
		String response = getResponseFromPlayer(message);
		lblPlayerMarker.setText(response);
		return response;
	}
	
	public String askPlayerQuestion(String message) {
		return getResponseFromPlayer(message);
	}
	
	/**
	 * return the player's preferred number of opponents
	 * @return
	 */
	public int getPreferredNumberOfPlayers(String message) {
		return Integer.parseInt(getResponseFromPlayer(message));
	}
	
	private String getResponseFromPlayer(String message){
		return JOptionPane.showInputDialog(message);
	}
	
	/**
	 * enable a valid player turn option
	 * @param buttonName
	 */
	public void enableButton(String buttonName) {
		switch (buttonName) {
		case "accuse":
			btnAccuse.setEnabled(true);
			break;
		case "Secret":
			btnUseSecretPassage.setEnabled(true);
			break;
		case "suggest":
			btnSuggest.setEnabled(true);
			break;
		case "Up":
			btnUp.setEnabled(true);
			break;
		case "Right":
			btnRight.setEnabled(true);
			break;
		case "Left":
			btnLeft.setEnabled(true);
			break;
		case "Down":
			btnDown.setEnabled(true);
			break;
		}
	}
	
	private String makeOneWordProperCase(String string){
		String result = "";
		result += string.substring(0, 1).toUpperCase();
		for(int k=  1; k <string.length();k++){
			result += string.substring(k, k+1).toLowerCase();	
		}
		return result;
	}
	
	/**
	 * parse the cards string and display
	 * @param cards
	 */
	public void praseCards(String allCards){
		String[] cards = allCards.split(",");

		for(int i = 0;i<cards.length;i++){
			
			String[] cardName = cards[i].split(" ");	
			String cardNameResult = makeOneWordProperCase(cardName[0]);
			for(int j = 1;j<cardName.length;j++){
				cardNameResult += " " + makeOneWordProperCase(cardName[j]);
			}
			cards[i] = cardNameResult;
			

			switch (cards[i]){
				case Character.m_COL_MUSTARD:
					txtColonelMustard.setText("X");
					break;
				case Character.m_MISS_SCARLET:
					txtMissScarlet.setText("X");
					break;
				case Character.m_MR_GREEN:
					txtMrGreen.setText("X");
					break;
				case Character.m_MRS_PEACOCK:
					txtMrsPeacock.setText("X");
					break;
				case Character.m_MRS_WHITE:
					txtMrsWhite.setText("X");
					break;
				case Character.m_PROF_PLUM:
					txtProfessorPlum.setText("X");
					break;
				case Weapon.m_CANDLESTICK:
					txtCandlestick.setText("X");
					break;
				case Weapon.m_KNIFE:
					txtKnife.setText("X");
					break;
				case Weapon.m_LEAD_PIPE:
					txtLeadPipe.setText("X");
					break;
				case Weapon.m_REVOLVER:
					txtRevolver.setText("X");
					break;
				case Weapon.m_ROPE:
					txtRope.setText("X");
					break;
				case Weapon.m_WRENCH:
					txtWrench.setText("X");
					break;
				case Room.m_STUDY:
					txtStudy.setText("X");
					break;
				case Room.m_HALL:
					txtHall.setText("X");
					break;
				case Room.m_LOUNGE:
					txtLounge.setText("X");
					break;
				case Room.m_LIBRARY:
					txtLibrary.setText("X");
					break;
				case Room.m_BILLIARD_ROOM:
					txtBilliardRoom.setText("X");
					break;
				case Room.m_DINING_ROOM:
					txtDiningRoom.setText("X");
					break;
				case Room.m_CONSERVATORY:
					txtConservatory.setText("X");
					break;
				case Room.m_BALLROOM:
					txtBallroom.setText("X");
					break;
				case Room.m_KITCHEN:
					txtKitchen.setText("X");
					break;
			}
		}
	}
	
	public String getResponse() {
		String returnValue = response;
		response = "nothing";
		return returnValue;
	}

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		try {
			new GUI();
		}
		catch (Exception ex) {
			ex.printStackTrace();
		}
	}

	/**
	 * Create the application.
	 */
	public GUI() {
		initialize();
		run();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frmClueless = new JFrame();
		frmClueless.setTitle("Clue-Less");
		frmClueless.setResizable(false);
		frmClueless.setBounds(100, 100, 800, 600);
		frmClueless.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frmClueless.getContentPane().setLayout(null);
		
		JPanel pnlPlayerControlPanel = new JPanel();
		pnlPlayerControlPanel.setBounds(10, 422, 774, 139);
		frmClueless.getContentPane().add(pnlPlayerControlPanel);
		pnlPlayerControlPanel.setLayout(null);
		
		JPanel pnlPlayerMarker = new JPanel();
		pnlPlayerMarker.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlPlayerMarker.setBounds(10, 11, 92, 117);
		pnlPlayerControlPanel.add(pnlPlayerMarker);
		
		lblPlayerMarker = new JLabel("");
		pnlPlayerMarker.add(lblPlayerMarker);
		
		JPanel pnlPlayerCards = new JPanel();
		pnlPlayerCards.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlPlayerCards.setBounds(488, 11, 276, 117);
		pnlPlayerControlPanel.add(pnlPlayerCards);
		
		JPanel pnlActions = new JPanel();
		pnlActions.setBounds(112, 11, 366, 117);
		pnlPlayerControlPanel.add(pnlActions);
		pnlActions.setLayout(null);
		
		ActionListener buttonListener = new ActionListener() {
			public synchronized void actionPerformed(ActionEvent arg0) {
				if(arg0.getSource().equals(btnUp)){
					processMessage(Move.m_UP);
					response = "up";
				}else if(arg0.getSource().equals(btnDown)){
					processMessage(Move.m_DOWN);
					response = "down";
				}else if(arg0.getSource().equals(btnRight)){
					processMessage(Move.m_RIGHT);
					response = "right";
				}else if(arg0.getSource().equals(btnLeft)){
					processMessage(Move.m_LEFT);
					response = "left";
				}else if(arg0.getSource().equals(btnSuggest)){
					processMessage("Suggest");
					response = "suggest";
				}else if(arg0.getSource().equals(btnAccuse)){
					processMessage("Accuse");
					response = "accuse";
				}else if(arg0.getSource().equals(btnUseSecretPassage)){
					processMessage("Use Secret Passage");
					response = "usesecretpassage";
				}
				
				btnUp.setEnabled(false);
				btnDown.setEnabled(false);
				btnRight.setEnabled(false);
				btnLeft.setEnabled(false);
				btnSuggest.setEnabled(false);
				btnAccuse.setEnabled(false);
				btnUseSecretPassage.setEnabled(false);
				
				notifyAll();
			}
		};
		
		btnSuggest = new Button("Suggest");
		btnSuggest.setEnabled(false);
		btnSuggest.addActionListener(buttonListener);
		btnSuggest.setBounds(161, 51, 70, 22);
		pnlActions.add(btnSuggest);
		
		btnUp = new Button(Move.m_UP);
		btnUp.setEnabled(false);
		btnUp.addActionListener(buttonListener);
		btnUp.setBounds(37, 10, 22, 22);
		pnlActions.add(btnUp);
		
		btnLeft = new Button(Move.m_LEFT);
		btnLeft.setEnabled(false);
		btnLeft.addActionListener(buttonListener);
		btnLeft.setBounds(10, 38, 22, 22);
		pnlActions.add(btnLeft);
		
		btnDown = new Button(Move.m_DOWN);
		btnDown.setEnabled(false);
		btnDown.addActionListener(buttonListener);
		btnDown.setBounds(37, 66, 22, 22);
		pnlActions.add(btnDown);

		btnRight = new Button(Move.m_RIGHT);
		btnRight.setEnabled(false);
		btnRight.addActionListener(buttonListener);
		btnRight.setBounds(64, 38, 22, 22);
		pnlActions.add(btnRight);
		
		btnAccuse = new Button("Accuse");
		btnAccuse.setEnabled(false);
		btnAccuse.addActionListener(buttonListener);
		btnAccuse.setBounds(237, 51, 70, 22);
		pnlActions.add(btnAccuse);
		
		btnUseSecretPassage = new Button("Use Secret Passage");
		btnUseSecretPassage.setEnabled(false);
		btnUseSecretPassage.addActionListener(buttonListener);
		btnUseSecretPassage.setBounds(161, 23, 146, 22);
		pnlActions.add(btnUseSecretPassage);
		
		txtMessages = new JTextArea();
		txtMessages.setWrapStyleWord(true);
		txtMessages.setLineWrap(true);
		txtMessages.setEditable(false);
		txtMessages.setBounds(632, 11, 152, 400);
		frmClueless.getContentPane().add(txtMessages);
		
		JPanel pnlGameBoard = new JPanel();
		pnlGameBoard.setBounds(222, 11, 400, 400);
		frmClueless.getContentPane().add(pnlGameBoard);
		pnlGameBoard.setLayout(null);
		
		JPanel pnlStudy = new JPanel();
		pnlStudy.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlStudy.setBounds(0, 0, 100, 100);
		pnlGameBoard.add(pnlStudy);
		pnlStudy.setLayout(null);
		
		JPanel pnlST_KI = new JPanel();
		pnlST_KI.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlST_KI.setBounds(75, 75, 25, 25);
		pnlStudy.add(pnlST_KI);
		
		JLabel label = new JLabel("Study");
		label.setBounds(10, 11, 80, 17);
		pnlStudy.add(label);
		
		JPanel pnlHall = new JPanel();
		pnlHall.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlHall.setBounds(150, 0, 100, 100);
		pnlGameBoard.add(pnlHall);
		pnlHall.setLayout(null);
		
		JLabel label_1 = new JLabel("Hall");
		label_1.setBounds(10, 11, 80, 14);
		pnlHall.add(label_1);
		
		JPanel pnlLounge = new JPanel();
		pnlLounge.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlLounge.setBounds(300, 0, 100, 100);
		pnlGameBoard.add(pnlLounge);
		pnlLounge.setLayout(null);
		
		JPanel pnlLO_CO = new JPanel();
		pnlLO_CO.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlLO_CO.setBounds(0, 75, 25, 25);
		pnlLounge.add(pnlLO_CO);
		
		JLabel label_2 = new JLabel("Lounge");
		label_2.setBounds(10, 11, 65, 17);
		pnlLounge.add(label_2);
		
		JPanel pnlLibrary = new JPanel();
		pnlLibrary.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlLibrary.setBounds(0, 150, 100, 100);
		pnlGameBoard.add(pnlLibrary);
		pnlLibrary.setLayout(null);
		
		JLabel label_3 = new JLabel("Library");
		label_3.setBounds(10, 11, 80, 17);
		pnlLibrary.add(label_3);
		
		JPanel pnlBilliardRoom = new JPanel();
		pnlBilliardRoom.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlBilliardRoom.setBounds(150, 150, 100, 100);
		pnlGameBoard.add(pnlBilliardRoom);
		pnlBilliardRoom.setLayout(null);
		
		JLabel label_5 = new JLabel("Billiard Room");
		label_5.setBounds(10, 11, 80, 17);
		pnlBilliardRoom.add(label_5);
		
		JPanel pnlDiningRoom = new JPanel();
		pnlDiningRoom.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlDiningRoom.setBounds(300, 150, 100, 100);
		pnlGameBoard.add(pnlDiningRoom);
		pnlDiningRoom.setLayout(null);
		
		JLabel label_6 = new JLabel("Dining Room");
		label_6.setBounds(10, 11, 80, 17);
		pnlDiningRoom.add(label_6);
		
		JPanel pnlConservatory = new JPanel();
		pnlConservatory.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlConservatory.setBounds(0, 300, 100, 100);
		pnlGameBoard.add(pnlConservatory);
		pnlConservatory.setLayout(null);
		
		JPanel pnlCO_LO = new JPanel();
		pnlCO_LO.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlCO_LO.setBounds(75, 0, 25, 25);
		pnlConservatory.add(pnlCO_LO);
		
		JLabel label_4 = new JLabel("Conservatory");
		label_4.setBounds(10, 11, 80, 17);
		pnlConservatory.add(label_4);
		
		JPanel pnlBallroom = new JPanel();
		pnlBallroom.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlBallroom.setBounds(150, 300, 100, 100);
		pnlGameBoard.add(pnlBallroom);
		pnlBallroom.setLayout(null);
		
		JLabel label_7 = new JLabel("Ballroom");
		label_7.setBounds(10, 11, 80, 17);
		pnlBallroom.add(label_7);
		
		JPanel pnlKitchen = new JPanel();
		pnlKitchen.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlKitchen.setBounds(300, 300, 100, 100);
		pnlGameBoard.add(pnlKitchen);
		pnlKitchen.setLayout(null);
		
		JPanel pnlKI_ST = new JPanel();
		pnlKI_ST.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlKI_ST.setBounds(0, 0, 25, 25);
		pnlKitchen.add(pnlKI_ST);
		
		JLabel label_8 = new JLabel("Kitchen");
		label_8.setBounds(10, 11, 80, 17);
		pnlKitchen.add(label_8);
		
		JPanel pnlST_HA = new JPanel();
		pnlST_HA.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlST_HA.setBounds(100, 25, 50, 50);
		pnlGameBoard.add(pnlST_HA);
		
		JPanel pnlHA_LO = new JPanel();
		pnlHA_LO.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlHA_LO.setBounds(250, 25, 50, 50);
		pnlGameBoard.add(pnlHA_LO);
		
		JPanel pnlLI_BI = new JPanel();
		pnlLI_BI.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlLI_BI.setBounds(100, 175, 50, 50);
		pnlGameBoard.add(pnlLI_BI);
		
		JPanel pnlBI_DI = new JPanel();
		pnlBI_DI.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlBI_DI.setBounds(250, 175, 50, 50);
		pnlGameBoard.add(pnlBI_DI);
		
		JPanel pnlCO_BA = new JPanel();
		pnlCO_BA.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlCO_BA.setBounds(100, 325, 50, 50);
		pnlGameBoard.add(pnlCO_BA);
		
		JPanel pnlBA_KI = new JPanel();
		pnlBA_KI.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlBA_KI.setBounds(250, 325, 50, 50);
		pnlGameBoard.add(pnlBA_KI);
		
		JPanel pnlLI_CO = new JPanel();
		pnlLI_CO.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlLI_CO.setBounds(25, 250, 50, 50);
		pnlGameBoard.add(pnlLI_CO);
		
		JPanel pnlST_LI = new JPanel();
		pnlST_LI.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlST_LI.setBounds(25, 100, 50, 50);
		pnlGameBoard.add(pnlST_LI);
		
		JPanel pnlHA_BI = new JPanel();
		pnlHA_BI.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlHA_BI.setBounds(175, 100, 50, 50);
		pnlGameBoard.add(pnlHA_BI);
		
		JPanel pnlBI_BA = new JPanel();
		pnlBI_BA.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlBI_BA.setBounds(175, 250, 50, 50);
		pnlGameBoard.add(pnlBI_BA);
		
		JPanel pnlLO_DI = new JPanel();
		pnlLO_DI.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlLO_DI.setBounds(325, 100, 50, 50);
		pnlGameBoard.add(pnlLO_DI);
		
		JPanel pnlDI_KI = new JPanel();
		pnlDI_KI.setBorder(new LineBorder(new Color(0, 0, 0)));
		pnlDI_KI.setBounds(325, 250, 50, 50);
		pnlGameBoard.add(pnlDI_KI);
		
		JPanel pnlGameInfo = new JPanel();
		pnlGameInfo.setBounds(10, 11, 202, 400);
		frmClueless.getContentPane().add(pnlGameInfo);
		pnlGameInfo.setLayout(null);
		
		txtColonelMustard = new JTextField();
		txtColonelMustard.setEditable(false);
		txtColonelMustard.setBounds(0, 21, 17, 17);
		pnlGameInfo.add(txtColonelMustard);
		txtColonelMustard.setColumns(10);
		
		JLabel lblColonelMustard = new JLabel("Colonel Mustard");
		lblColonelMustard.setBounds(27, 22, 175, 17);
		pnlGameInfo.add(lblColonelMustard);
		
		txtMissScarlet = new JTextField();
		txtMissScarlet.setEditable(false);
		txtMissScarlet.setColumns(10);
		txtMissScarlet.setBounds(0, 38, 17, 17);
		pnlGameInfo.add(txtMissScarlet);
		
		JLabel lblMissScarlet = new JLabel("Miss Scarlet");
		lblMissScarlet.setBounds(27, 38, 175, 17);
		pnlGameInfo.add(lblMissScarlet);
		
		txtProfessorPlum = new JTextField();
		txtProfessorPlum.setEditable(false);
		txtProfessorPlum.setColumns(10);
		txtProfessorPlum.setBounds(0, 55, 17, 17);
		pnlGameInfo.add(txtProfessorPlum);
		
		JLabel lblProfessorPlum = new JLabel("Professor Plum");
		lblProfessorPlum.setBounds(27, 55, 175, 17);
		pnlGameInfo.add(lblProfessorPlum);
		
		txtMrGreen = new JTextField();
		txtMrGreen.setEditable(false);
		txtMrGreen.setColumns(10);
		txtMrGreen.setBounds(0, 72, 17, 17);
		pnlGameInfo.add(txtMrGreen);
		
		JLabel lblMrGreen = new JLabel("Mr. Green");
		lblMrGreen.setBounds(27, 72, 175, 17);
		pnlGameInfo.add(lblMrGreen);
		
		txtMrsWhite = new JTextField();
		txtMrsWhite.setEditable(false);
		txtMrsWhite.setColumns(10);
		txtMrsWhite.setBounds(0, 89, 17, 17);
		pnlGameInfo.add(txtMrsWhite);
		
		JLabel lblMrsWhite = new JLabel("Mrs. White");
		lblMrsWhite.setBounds(27, 89, 175, 17);
		pnlGameInfo.add(lblMrsWhite);
		
		txtMrsPeacock = new JTextField();
		txtMrsPeacock.setEditable(false);
		txtMrsPeacock.setColumns(10);
		txtMrsPeacock.setBounds(0, 106, 17, 17);
		pnlGameInfo.add(txtMrsPeacock);
		
		JLabel lblMrsPeacock = new JLabel("Mrs. Peacock");
		lblMrsPeacock.setBounds(27, 106, 175, 17);
		pnlGameInfo.add(lblMrsPeacock);
		
		JLabel lblSuspects = new JLabel("Suspects");
		lblSuspects.setBounds(10, 0, 192, 17);
		pnlGameInfo.add(lblSuspects);
		
		JLabel lblWeapons = new JLabel("Weapons");
		lblWeapons.setBounds(10, 134, 192, 17);
		pnlGameInfo.add(lblWeapons);
		
		txtCandlestick = new JTextField();
		txtCandlestick.setEditable(false);
		txtCandlestick.setColumns(10);
		txtCandlestick.setBounds(0, 155, 17, 17);
		pnlGameInfo.add(txtCandlestick);
		
		txtKnife = new JTextField();
		txtKnife.setEditable(false);
		txtKnife.setColumns(10);
		txtKnife.setBounds(0, 172, 17, 17);
		pnlGameInfo.add(txtKnife);
		
		txtLeadPipe = new JTextField();
		txtLeadPipe.setEditable(false);
		txtLeadPipe.setColumns(10);
		txtLeadPipe.setBounds(0, 189, 17, 17);
		pnlGameInfo.add(txtLeadPipe);
		
		txtRevolver = new JTextField();
		txtRevolver.setEditable(false);
		txtRevolver.setColumns(10);
		txtRevolver.setBounds(0, 206, 17, 17);
		pnlGameInfo.add(txtRevolver);
		
		txtRope = new JTextField();
		txtRope.setEditable(false);
		txtRope.setColumns(10);
		txtRope.setBounds(0, 223, 17, 17);
		pnlGameInfo.add(txtRope);
		
		txtWrench = new JTextField();
		txtWrench.setEditable(false);
		txtWrench.setColumns(10);
		txtWrench.setBounds(0, 240, 17, 17);
		pnlGameInfo.add(txtWrench);
		
		JLabel lblWrench = new JLabel("Wrench");
		lblWrench.setBounds(27, 240, 175, 17);
		pnlGameInfo.add(lblWrench);
		
		JLabel lblRope = new JLabel("Rope");
		lblRope.setBounds(27, 223, 175, 17);
		pnlGameInfo.add(lblRope);
		
		JLabel lblRevolver = new JLabel("Revolver");
		lblRevolver.setBounds(27, 206, 175, 17);
		pnlGameInfo.add(lblRevolver);
		
		JLabel lblLeadPipe = new JLabel("Lead Pipe");
		lblLeadPipe.setBounds(27, 189, 175, 17);
		pnlGameInfo.add(lblLeadPipe);
		
		JLabel lblCandlestick = new JLabel("Candlestick");
		lblCandlestick.setBounds(27, 156, 175, 17);
		pnlGameInfo.add(lblCandlestick);
		
		JLabel lblKnife = new JLabel("Knife");
		lblKnife.setBounds(27, 172, 175, 17);
		pnlGameInfo.add(lblKnife);
		
		JLabel lblRooms = new JLabel("Rooms");
		lblRooms.setBounds(10, 268, 192, 17);
		pnlGameInfo.add(lblRooms);
		
		txtBallroom = new JTextField();
		txtBallroom.setEditable(false);
		txtBallroom.setColumns(10);
		txtBallroom.setBounds(0, 289, 17, 17);
		pnlGameInfo.add(txtBallroom);
		
		txtBilliardRoom = new JTextField();
		txtBilliardRoom.setEditable(false);
		txtBilliardRoom.setColumns(10);
		txtBilliardRoom.setBounds(0, 306, 17, 17);
		pnlGameInfo.add(txtBilliardRoom);
		
		txtConservatory = new JTextField();
		txtConservatory.setEditable(false);
		txtConservatory.setColumns(10);
		txtConservatory.setBounds(0, 323, 17, 17);
		pnlGameInfo.add(txtConservatory);
		
		txtDiningRoom = new JTextField();
		txtDiningRoom.setEditable(false);
		txtDiningRoom.setColumns(10);
		txtDiningRoom.setBounds(0, 340, 17, 17);
		pnlGameInfo.add(txtDiningRoom);
		
		txtHall = new JTextField();
		txtHall.setEditable(false);
		txtHall.setColumns(10);
		txtHall.setBounds(0, 357, 17, 17);
		pnlGameInfo.add(txtHall);
		
		txtKitchen = new JTextField();
		txtKitchen.setEditable(false);
		txtKitchen.setColumns(10);
		txtKitchen.setBounds(110, 289, 17, 17);
		pnlGameInfo.add(txtKitchen);
		
		JLabel lblKitchen = new JLabel("Kitchen");
		lblKitchen.setBounds(137, 289, 65, 17);
		pnlGameInfo.add(lblKitchen);
		
		JLabel lblHall = new JLabel("Hall");
		lblHall.setBounds(27, 357, 22, 17);
		pnlGameInfo.add(lblHall);
		
		JLabel lblDiningRoom = new JLabel("Dining Room");
		lblDiningRoom.setBounds(27, 340, 65, 17);
		pnlGameInfo.add(lblDiningRoom);
		
		JLabel lblConservatory = new JLabel("Conservatory");
		lblConservatory.setBounds(27, 323, 72, 17);
		pnlGameInfo.add(lblConservatory);
		
		JLabel lblBallroom = new JLabel("Ballroom");
		lblBallroom.setLabelFor(txtBallroom);
		lblBallroom.setBounds(27, 290, 47, 17);
		pnlGameInfo.add(lblBallroom);
		
		JLabel lblBilliardRoom = new JLabel("Billiard Room");
		lblBilliardRoom.setBounds(27, 306, 65, 17);
		pnlGameInfo.add(lblBilliardRoom);
		
		txtLibrary = new JTextField();
		txtLibrary.setEditable(false);
		txtLibrary.setColumns(10);
		txtLibrary.setBounds(110, 306, 17, 17);
		pnlGameInfo.add(txtLibrary);
		
		JLabel lblLibrary = new JLabel("Library");
		lblLibrary.setBounds(137, 306, 65, 17);
		pnlGameInfo.add(lblLibrary);
		
		txtLounge = new JTextField();
		txtLounge.setEditable(false);
		txtLounge.setColumns(10);
		txtLounge.setBounds(110, 323, 17, 17);
		pnlGameInfo.add(txtLounge);
		
		JLabel lblLounge = new JLabel("Lounge");
		lblLounge.setBounds(137, 323, 65, 17);
		pnlGameInfo.add(lblLounge);
		
		txtStudy = new JTextField();
		txtStudy.setEditable(false);
		txtStudy.setColumns(10);
		txtStudy.setBounds(110, 340, 17, 17);
		pnlGameInfo.add(txtStudy);
		
		JLabel lblStudy = new JLabel("Study");
		lblStudy.setBounds(137, 340, 65, 17);
		pnlGameInfo.add(lblStudy);
	}
}